/*--------------------------------------------------*/
// Base - 基础样式 
/*--------------------------------------------------*/

html,
body,
div,
main,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
span,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: baseline;
}

header,
nav,
footer,
main,
section,
aside,
article,
figure {
	display: block;
}

html {
	font-size: $font-size-base;
}

body {
	font-family: $font-family-chinese;
	font-size: 1rem;
	font-weight: normal;
	color: $text-color;
	-webkit-text-size-adjust: 100%;
	-moz-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/*
		word-spacing: 1px;
		letter-spacing: 1px;
		word-wrap: break-word;//针对单词本身换行做处理
		word-break: break-all;//针对句子本身换行做处理
	*/
}

p {
	text-align: justify;
	margin-bottom: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	// text-transform: uppercase;
	font-weight: $font-weight-bold;
	margin-bottom: 1rem;
}

h1 {
	font-size: 2rem;
}

h2 {
	font-size: 1.75rem;
}

h3 {
	font-size: 1.5rem;
}

h4 {
	font-size: 1.25rem;
}

h5, h6 {
	font-size: 1rem;
}

hr {
	border-bottom: 1px solid $grey-midle;
	margin-bottom: 1rem;
}

blockquote {
	quotes: none;
	border-left: 4px solid $border-color;
	background: $grey-light;
	margin-bottom: 1rem;
	padding: 0.5rem 0.5rem 0.5rem 2rem;
	
	p {
		margin-bottom: 0;
	}
	
	footer {
	    font-family: inherit;
	  	font-size: inherit;
		line-height: inherit;
	    text-align: inherit;
	    color: inherit; 
	    background-color: inherit; 
	    padding: 0;
	}
}

b,
strong {
	font-weight: $font-weight-bold;
}

em,
cite,
q {
	font-style: italic;
	quotes: auto;
}

sup,
sub {
	position: relative;
	font-size: 0.75rem;
}

sup {
	top: -0.5rem
}

sub {
	bottom: -0.2rem
}

small {
	font-size: 0.75rem;
}

acronym,
abbr {
	border-bottom: 1px dotted $grey-midle;
}

a {
	transition: color 0.3s ease-in-out, background-color 0.2s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.2s ease-in-out;
	border-bottom: 0px solid $grey-midle;
	text-decoration: none;
	color: $link-color;
	cursor: pointer;
	&:hover {
		border-bottom-color: transparent;
		color: $link-hover-color;
	}
}

ul,
ol,
dl {
	margin-bottom: 1rem;
}

ul {
	list-style: disc;
	list-style-position: inside;
}

ol {
	list-style: decimal-leading-zero;
	list-style-position: inside;
}

dt {
	font-weight: $font-weight-bold;
}

table {
	display: table;
	font-size: $table-font-size;
	table-layout: fixed;
	border-collapse: collapse;
	border-spacing: 0;
	/*min-width: 100%;*/
	margin-bottom: 1rem;
	thead {
		tr {
			border: 1px solid $table-border-color;
			background: $table-row-odd-bg-color;
			font-weight: $font-weight-bold;
		}
	}
	tbody {
		tr {
			border: 1px solid $table-border-color;
			&:nth-child(2n) {
				background: $grey-light;
			}
		}
	}
	th,
	td {
		padding: 0.25rem 0.5rem;
		border: 1px solid $table-border-color;
		/*min-width: 60px;*/
	}
}

img,
video,
audio{
	display: block;
	opacity: 1;
	max-width: 100%;
	width: auto;
	height: auto;
	cursor: pointer;
	margin: 0 auto 1rem;
}

code {
	font-family: $code-font-family;
	font-size: 1rem;
	padding: 2px 4px;
	color: $code-foreground;
	background: $code-background;
	border-radius: $code-border-radius;
}

pre {
	-webkit-overflow-scrolling: touch;
	font-family: $code-font-family;
	font-size: 1rem;
	padding: 2px 4px;
	margin-bottom: 1rem;
	code {
		display: block;
		padding: 1rem 1.5rem;
		overflow-x: auto;
	}
}

/*http://webdesignerwall.com/tutorials/css-elastic-videos*/
.video-container {
	position: relative;
	padding-top: cal( 9 / 16) rem;
	/* 16:9 ratio*/
	margin-bottom: 1rem;
	height: 0;
	overflow: hidden;
	iframe, object,	embed {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		margin-top: 0;
	}
}

iframe {
	border: none;
	margin-bottom: 1rem;
}